/*
 * QEventsAdapter.h  0.4.0 / Nov 17, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
#ifndef QEVENTSADAPTER_H
#define QEVENTSADAPTER_H

#include "Cute4jCore.h"

#include <QKeyEvent>
#include <QMouseEvent>

#include "com_cute4j_swing_events_KeyEvent.h"
#include "com_cute4j_swing_events_SwingEvent.h"

// SwingKeyTypedEvent Class. ---------------------------------------------------

/*!
 * \brief Swing Key Typed Event.
 *
 * \author Slobodan Vrkacevic
 * \version 0.4.0
 */
class CUTE4J_EXPORT SwingKeyTypedEvent : public QKeyEvent
{
public:
  SwingKeyTypedEvent(int key, Qt::KeyboardModifiers modifiers);
  SwingKeyTypedEvent(QKeyEvent *ke);
public:
  static const int TYPE = QEvent::User + 1;
};

// SwingMouseClickedEvent Class. -----------------------------------------------

/*!
 * \brief Swing Mouse Clicked Event.
 *
 * \author Slobodan Vrkacevic
 * \version 0.4.0
 */
class SwingMouseClickedEvent : public QMouseEvent
{
public:
  SwingMouseClickedEvent(const QPoint &position, Qt::MouseButton button,
                         Qt::MouseButtons buttons,
                         Qt::KeyboardModifiers modifiers);
  SwingMouseClickedEvent(QMouseEvent *me);
public:
  static const int TYPE = QEvent::User + 2;
};

// Macro Definition. -----------------------------------------------------------

#define SWING_EVENT(mask) com_cute4j_swing_events_SwingEvent_##mask

#endif // QEVENTSADAPTER_H
